home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4792 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  58 lines

  1. Path: strauss.udel.edu!not-for-mail
  2. From: jcorig@strauss.udel.edu (John Pat Corigliano)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: SAS Overlays
  5. Date: 5 Mar 1996 01:25:58 -0500
  6. Organization: University of Delaware
  7. Message-ID: <4hgmpm$a88@strauss.udel.edu>
  8. NNTP-Posting-Host: strauss.udel.edu
  9.  
  10. I would like to use overlays for a project - right now the proggy is using
  11. about 100K so I though overlays would help.  I want to put all the code
  12. that isn't used too often, like init stuff into overlays so that they are
  13. removed from memory.  My proggy works fine if I link it normally, but when
  14. I try to implement overlays, here comes Mr. Guru (8000 0004).
  15.  
  16. Here's part of the makefile:
  17.  
  18. CFLAGS  = STRIPDEBUG NOCHKABORT ERROREXX PARMS=REG VERBOSE NOLINK NOSTACKCHECK
  19.           MEMORYSIZE=HUGE OPTIMIZE OPTIMIZERSIZE
  20. LDFLAGS = NEWOCV
  21. LIBS    = lib:scm.lib lib:sc.lib lib:amiga.lib
  22.  
  23. .c .o:
  24.     $(RM) $@
  25.     $(CC) $(CFLAGS) $*.c
  26.  
  27. Program : $(OBJS)
  28.    $(RM) $@
  29.    $(LD) from lib:c.o main.o with overlay LIB $(LIBS) to $@ \
  30.    $(CC) $(LDFLAGS)
  31.  
  32. And here is the "overlay" file:
  33.  
  34. overlay
  35. window.o
  36. *dynamic.o
  37. **screens.o
  38. ***exchange.o
  39. ****exec.o
  40. *****pubport.o
  41. ******win_control.o+boopsi.o+colors.o+iff.o+image.o+menu.o+setup.o+tree.o
  42. #
  43.  
  44. I want everything but the stuff on the last line to always be in memory.
  45. This is my first attempt at overlays, so any help would be appreciated.
  46.  
  47. Also, are there any special techniques needed?  i.e. do global variables
  48. work the same?
  49.  
  50. The program creates 2 sub-processes.  Does this effect overlays?
  51.  
  52. TIA,
  53. -- 
  54. John Corigliano                                  jcorig@strauss.udel.edu
  55. Computer and Information Science                  University of Delaware
  56. --
  57. "Never drive a car when you're dead."  - Tom Waits
  58.